local zhangfu = fk.CreateSkill {
  name = "th_zhangfu",
  tags = { Skill.Compulsory },
}

zhangfu:addEffect(fk.PreCardUse, {
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(zhangfu.name) and player.phase < Player.NotActive and table.find(player.room:getOtherPlayers(player, false), function(p) return p.chained end)
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    data.disresponsiveList = data.disresponsiveList or {}
    for _, p in ipairs(room:getOtherPlayers(player, false)) do
      if p.chained and not table.contains(data.disresponsiveList, p) then
        table.insert(data.disresponsiveList, p)
      end
    end
  end
})
zhangfu:addEffect("targetmod", {
  name = "#th_zhangfu_tmd",
  bypass_distances = function(self, player, skill, card, to)
    if player:hasSkill("th_zhangfu") and player.phase < Player.NotActive and to then
      return to.chained
    end
  end
})

Fk:loadTranslationTable{
  ["th_zhangfu"] = "瘴缚",
  [":th_zhangfu"] = "锁定技，你的回合内，你对横置的其他角色使用牌无距离限制且其不可响应你使用的牌。",
}

return zhangfu